package com.artislong;

import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author 陈敏
 * @version McpServerStdioApplication.java, v 1.0 2025 07 25 16:45 chenmin Exp $
 * Created on 2025 07 25
 */
@SpringBootApplication
public class McpServerStdioApplication {
    public static void main(String[] args) {
        SpringApplication.run(McpServerStdioApplication.class, args);
    }

    @Bean
    public ToolCallbackProvider weatherTools(McpTools mcpTools) {
        return MethodToolCallbackProvider.builder().toolObjects(mcpTools).build();
    }
}
